Repository navigation
feat(web): first steps on Home, clearer next actions, more help tips - #48
Merged
Merged
Conversation
- Home shows a "Set the table" first steps card until a group has more than one member. - Group header leads with Settle up when you owe. - New expense, Settle up and New plan offer Create a group when you have no groups, instead of a dead end. - A real not-found page. - Eight new help topics, each linked to an existing guide heading. - Colour roles: olive for money owed to you and success, muted grey for settled amounts, saffron for the selected bottom tab. Tomato stays the primary action colour. - Fixes: duplicate empty state buttons on Plans and Friends, a clipped search placeholder on phones, scroll rows with no overflow cue, the wrong tab lit on payment and repeating pages.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The owner asked for a UI and UX pass on the Potluck web app: find and fix UI quirks, bugs and visual defects; make the app as easy and intuitive as possible with visual guidance on what to do next without overwhelming the user; add help affordances wherever a feature is confusing, linking to the user guide or showing a quick tip; and keep the palette and UI digestible, unique and fun. A large overhaul was allowed.
Deliberate decisions:
Constraints: this is a UI pass with no schema changes and no migrations. Never write to production Supabase. Google sign in stays behind its app_config flag (off in the local seed, on in production); auth logic is unchanged. No em dashes or en dashes anywhere. No AI attribution in files, commits or PR text. A matching guide change ships in Fermulate/potluck-docs right after this merges.
What Changed
routerFallbacks,notFoundMode: 'root').features/help/topics.ts(expense list, balances across groups, create group, friend totals, Plans page, polls, RSVP, inbox) with help buttons and quick tips on the matching screens. New strings added in en and translated into de, es, fr and pt.#4a8431, retuned in light and dark tokens) instead of saffron, and settled or zero amounts are muted grey instead of green, including zero amounts passed asoweorowed. Count badges usetomato-strong, sideways scrollers (category chips, split modes) fade their right edge when there is more (useMoreToTheRight), the active group tab scrolls to centre, payments and repeating expense pages keep the Groups tab lit, and the expense search placeholder shortens on phones.docs/design.mdis rewritten to match, with unit tests and the onboarding e2e spec extended for the new behaviour.Credits: Musa Kaleem (directed), Ferrin (Ferrin-Y), and Noor (noorelmosrati).
Risk Assessment
✅ Low: A UI-only change with no schema, RPC or auth changes; both prior fix rounds hold up in the current code (newcomer check reads the full group list, Home waits for it, the app and its tests share one set of router fallbacks) and all eight new help anchors match headings that exist in the guide repo.
Testing
Built the target commit for production and drove a temporary Playwright journey spec (kept in the evidence directory, removed from the worktree) plus the existing onboarding spec against the real app on the local stack with per-test users, in mobile and desktop Chromium: 18 of 18 passed, then the newcomer Home journey repeated 8 times per viewport (16 of 16 passed, no Groups section flash recorded), then a final 16 of 16 rerun that retook all 38 screenshots after animations settled. Covered first steps card lifecycle, the no-flash hold, muted zero amounts, header Settle up rules, no-group create prompts, empty Plans and Friends, the not-found page at root and under a group, help topic links and the tomato and olive colour rules. No lint or full suite was run. Worktree is clean and no server is left running.
Evidence: Playwright run, this round (16 journeys, both viewports)
Evidence: Newcomer flash check, 8 repeats per viewport
desktop-chromium x8 and mobile-chromium x8: EVIDENCE groups section before card {"seen":null,"gone":null}; 16 passedEvidence: Journey spec used to drive the scenarios (not committed)
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 5 issues found → auto-fixed (2) ✅
apps/web/src/main.tsx:25- RouteNotFound is written as a standalone page (own <main id="main">, min-h-dvh, Wordmark; its comment says "no app frame around it, the miss happens at the root"), but the router is left on TanStack's default notFoundMode 'fuzzy', which renders defaultNotFoundComponent in the Outlet of the nearest matched parent that has children. Concrete path: a signed-in user opens /groups/<their group>/bogus (stale or mistyped link). Matches are root -> _app -> /groups/$groupId, so the page renders inside GroupLayout inside AppLayout: a second <main id="main"> nested in app-layout.tsx:150's main (duplicate id, nested main landmark), a second wordmark, and a full-viewport-height block under the group header and tabs. Same for any unknown path that resolves under _app. The new test only covers a root-level miss with a flat route tree. Smallest fix matching the author's stated design: set notFoundMode: 'root' beside defaultNotFoundComponent (apps/web/src/features/shell/route-error.tsx:52 is the component). Not verified against the installed router (node_modules is absent in this worktree); based on the documented default.apps/web/src/features/dashboard/home-dashboard.tsx:37- noGroups and FirstSteps both read planQueries.groups, which excludes friend tabs (is_direct) and archived groups (packages/api/src/plans.ts:169-170). So an established user whose groups are all archived, or who only uses friend tabs, is treated as a newcomer: Home shows "Set the table" with step 1 "Start a group" (first-steps.tsx:69, hasCompany never sees archived groups with members) and hides the Groups section (line 201) and the empty Coming up prompt (line 152). Second sequence: a user with zero groups dismisses the card; the Groups section, which carried the only "New group" tile on Home, stays hidden, so Home has no create-group affordance left (Groups tab and + still work). The intent says the card shows "until some group has more than one member" and that Home hides sections "impossible without a group"; whether archived or direct groups count, and whether the New group tile should survive dismissal, is a product decision.packages/i18n/src/en/plans.ts:407- home.firstSteps.expenseAction is added in en and translated in de, es, fr and pt (packages/i18n/src/{de,es,fr,pt}/plans.ts) but nothing renders it: the intent states step 3 has no button on purpose in this pass. No intent requirement needs the string; recommend removing it from all five locales until the button exists.apps/web/src/features/groups/group-layout.test.tsx:93- The test is titled "...and not once you are square or the group is archived" but only renders owing, the Balances tab, and a square group; no case sets archived_at. The archived half of the header rule (group-layout.tsx:!group.archived_at && group.my_net_cents < 0 && !onBalances) is unasserted, so dropping the archived check would pass. Add a render of an owing group with archived_at set and assert the Settle up link is absent.apps/web/src/features/expenses/form/split-editor.tsx:325- The merged ref is an inline arrow, so its identity changes on every SplitEditor render. React then calls the old callback with null and the new one with the node, which runs setNode(null) then setNode(node) in useMoreToTheRight (apps/web/src/lib/overflow.ts:10) on every render and schedules an extra render pass each time (it bails out, so no loop and no visible effect). Wrap the merged ref in useCallback with [modesFadeRef]; setNode is stable.🔧 Fix applied.
3 issues (2 warnings, 1 info) still open:
apps/web/src/features/dashboard/home-dashboard.tsx:37- noGroups and FirstSteps both read planQueries.groups, which excludes friend tabs (is_direct) and archived groups (packages/api/src/plans.ts:169-170). So an established user whose groups are all archived, or who only uses friend tabs, is treated as a newcomer: Home shows "Set the table" with step 1 "Start a group" (first-steps.tsx:69, hasCompany never sees archived groups with members) and hides the Groups section (line 201) and the empty Coming up prompt (line 152). Second sequence: a user with zero groups dismisses the card; the Groups section, which carried the only "New group" tile on Home, stays hidden, so Home has no create-group affordance left (Groups tab and + still work). The intent says the card shows "until some group has more than one member" and that Home hides sections "impossible without a group"; whether archived or direct groups count, and whether the New group tile should survive dismissal, is a product decision.apps/web/src/features/dashboard/home-dashboard.tsx:42- Introduced by the round 1 fix. The newcomer check now reads useMyGroups, which prefetch.home (apps/web/src/lib/prefetch.ts:36) does not start and which the Home hold (settled, home-dashboard.tsx:92) does not wait for. Whilemineis undefined,firstStepsandstepsLeadare false. Concrete sequence: a new user lands on /home after onboarding with no groups; the prefetched timeline and balances answer first, so Home reveals the empty Coming up prompt (New plan button) and the Groups section with the New group tile; then the my groups request (groups with members plus all balances) answers with [], and both sections disappear and the Set the table card takes their place (lines 160, 162, 210). This is the layout shift the holdBelow logic exists to prevent, on the first screen a newcomer sees. A newcomer with one solo group gets the card popping in above Coming up the same way. Fix: start myGroupsQueryOptions in prefetch.home and include the my groups query insettled(answered with data or an error, or HOLD_MS passed), so what sits below waits for it like it waits for the timeline and balances.apps/web/src/features/shell/route-error.test.tsx:103- Added in round 1. The test titled "...as the app sets the router up" builds its own router and passes notFoundMode: 'root' itself, so it shows what the router library does with that option, not that the app sets it: deleting notFoundMode from apps/web/src/main.tsx:27 (the regression round 1 fixed) leaves the test green. I confirmed against the installed router (router-core 1.171.39, findGlobalNotFoundRouteId and executeClientLane) that 'root' does render the page in the root Outlet and skips child guards, so the app behavior is correct today; only the guard is missing. To make it reject that regression, move the shared router options (defaultErrorComponent, defaultNotFoundComponent, notFoundMode) into an exported constant that main.tsx and this test both spread into createRouter.🔧 Fix applied.
✅ Re-checked - no issues remain.
🔧 **Test** - 2 issues found → auto-fixed (2) ✅
apps/web/src/features/dashboard/balance-hero.tsx- On a newcomer's Home the balance card shows 'All square' in green, 'You owe $0.00' in tomato and 'Owed to you $0.00' in green (screenshot mobile-chromium-01-home-newcomer.png). The intent says settled or zero amounts are muted grey (previously green). The headline may count as 'success' (olive), but the two $0.00 figures are zero amounts in owe and owed colours. Not changed here: whether the hero columns are exempt from the muted rule is a design decision.apps/web/src/features/balances/balances-tab.tsx- On the group Balances tab the hero read 'You owe $19.79' while the header, the who pays whom row and the member rows read $20.00, in two separate runs after network idle (desktop-chromium-06 and -19 screenshots). Most likely a count-up animation caught mid-frame; I did not confirm that it settles at $20.00. This change only touches colours in that file and in the Amount component, so it is not introduced by this diff, but worth a glance.pnpm buildin apps/web with VITE_SUPABASE_URL, VITE_SUPABASE_PUBLISHABLE_KEY, VITE_APP_URL=http://localhost:4319 (exit 0), thenpnpm preview --port 4319 --strictPortE2E_PORT=4319 pnpm exec playwright test e2e/zz-ui-pass-evidence.spec.ts e2e/onboarding.spec.ts --project=desktop-chromium --project=mobile-chromium(16 passed, group header test timed out on a stray wait in the temp spec)E2E_PORT=4319 pnpm exec playwright test e2e/zz-ui-pass-evidence.spec.ts -g "group header" --project=desktop-chromium --project=mobile-chromium(2 passed)curlof the 8 new help topic pages on docs.potluck.fermulate.com, checking each heading id exists (8 of 8)Manual review of screenshots: newcomer Home (mobile), group header owing, Balances tab, not-found under a group🔧 Fix applied.
1 warning still open:
apps/web/src/features/dashboard/home-dashboard.tsx:102- On desktop widths a newcomer with no groups can still see the Coming up and Groups sections before the Set the table card replaces them. The hold added in review round 2 ismax-lg:invisible, so it only hides the column on phones. In 3 of 4 desktop runs (1440 wide) the Groups heading was in the DOM and visible for about 65 to 75 ms on the local stack before the my groups answer removed it; with real network latency the window is as long as that request. On mobile the same race is hidden by the hold. Proposed repair: apply the hold to the right column on desktop too for the my groups query, or render that column's group-dependent sections only once my groups has answered. Not applied: the hold is mobile-only by existing design, so extending it is a product decision.E2E_PORT=4199 pnpm exec playwright test e2e/zz-ui-pass-evidence.spec.ts e2e/onboarding.spec.ts --project=desktop-chromium --project=mobile-chromium(temporary evidence spec, copy kept as ui-pass-evidence.spec.ts.txt in the evidence directory): 17 of 18 passed; the one failure was my own added probe asserting the Groups heading never appears before the card on desktoppnpm exec playwright test e2e/zz-ui-pass-evidence.spec.ts -g "newcomer Home" --repeat-each=3 --project=desktop-chromium --project=mobile-chromium: 6 of 6 passed with the probe changed to a measurementComputed colour checks on the Home balance card: zero You owe and Owed to you figures equal the muted label colour, All square headline is olive, a real $20.00 debt is tomatoViewed mobile-chromium-01-home-newcomer.png to confirm the muted zero figures and the Set the table cardRemoved the temporary spec, dist, playwright-report and test-results; worktree is clean and nothing listens on 4199🔧 Fix applied.
✅ Re-checked - no issues remain.
pnpm --filter @potluck/web exec playwright test e2e/zz-ui-pass-evidence.spec.ts e2e/onboarding.spec.ts --project=mobile-chromium --project=desktop-chromium --retries=0 --workers=4with CI=true, E2E_PORT=4175 (fresh production build + vite preview): 18 passedpnpm --filter @potluck/web exec playwright test e2e/zz-ui-pass-evidence.spec.ts -g "newcomer Home" --project=mobile-chromium --project=desktop-chromium --repeat-each=8 --retries=0 --workers=2: 16 passed, MutationObserver recorded no Groups heading before the first steps card in any runFinal rerun ofe2e/zz-ui-pass-evidence.spec.tson both projects with screenshots taken after animations finish: 16 passed, 38 screenshots refreshedManual review of desktop screenshots 01 (newcomer Home), 04 (established Home) and 19 (Balances tab while owing; hero settles on $20.00)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.